home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / jpsrc2.zip / MAKEFILE.UNI < prev    next >
Text File  |  1991-12-12  |  6KB  |  156 lines

  1. # Makefile for Independent JPEG Group's software
  2.  
  3. # This makefile is suitable for Unix-like systems with non-ANSI compilers.
  4. # If you have an ANSI compiler, makefile.ansi is a better starting point.
  5.  
  6. # Read SETUP instructions before saying "make" !!
  7.  
  8. # The name of your C compiler:
  9. CC= cc
  10.  
  11. # You may need to adjust these cc options:
  12. CFLAGS= -O
  13. # In particular:
  14. #   Add -DBSD if on a pure BSD system (see jinclude.h).
  15. #   Add -DVMS if on a VMS system (see ansi2knr.c).
  16. #   Add -DMSDOS if on an MSDOS system (see ansi2knr.c).
  17. #   Add -DMEM_STATS to enable gathering of memory usage statistics.
  18. #   You may also want to add -DTWO_FILE_COMMANDLINE or -D switches for other
  19. #   symbols listed in jconfig.h, if you prefer not to change jconfig.h.
  20.  
  21. # Link-time cc options:
  22. LDFLAGS= 
  23.  
  24. # To link any special libraries, add the necessary -l commands here.
  25. # In particular, on some versions of HP-UX (and probably other SysV-derived
  26. # systems) there is a faster alternate malloc(3) library that you can use
  27. # by adding "-lmalloc" to this line.
  28. LDLIBS= 
  29.  
  30. # miscellaneous OS-dependent stuff
  31. LN= $(CC)    # linker
  32. RM= rm -f    # file deletion command
  33. AR= ar rc    # library (.a) file creation command
  34. AR2= ranlib    # second step in .a creation (use "touch" if not needed)
  35.  
  36.  
  37. # source files (independently compilable files)
  38. SOURCES= jbsmooth.c jcarith.c jccolor.c jcdeflts.c jcexpand.c jchuff.c \
  39.         jcmain.c jcmaster.c jcmcu.c jcpipe.c jcsample.c jdarith.c jdcolor.c \
  40.         jddeflts.c jdhuff.c jdmain.c jdmaster.c jdmcu.c jdpipe.c jdsample.c \
  41.         jerror.c jquant1.c jquant2.c jfwddct.c jrevdct.c jutils.c \
  42.         jvirtmem.c jrdjfif.c jrdgif.c jrdppm.c jrdrle.c jrdtarga.c \
  43.         jwrjfif.c jwrgif.c jwrppm.c jwrrle.c jwrtarga.c
  44. # files included by source files
  45. INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c
  46. # documentation, test, and support files
  47. DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  48. MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  49.         makefile.mc5 makefile.mc6 makcjpeg.lnk makdjpeg.lnk makefile.tc \
  50.         makcjpeg.lst makdjpeg.lst makefile.pwc makcjpeg.cf makdjpeg.cf \
  51.         makljpeg.cf
  52. OTHERFILES= ansi2knr.c config.c
  53. TESTFILES= testorig.jpg testimg.ppm testimg.jpg
  54. DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(INCLUDES) $(OTHERFILES) \
  55.         $(TESTFILES)
  56. # objectfiles common to cjpeg and djpeg
  57. COMOBJECTS= jutils.o jvirtmem.o jerror.o
  58. # compression objectfiles
  59. CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
  60.         jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdgif.o jrdppm.o \
  61.         jrdrle.o jrdtarga.o
  62. COBJECTS= jcmain.o $(CLIBOBJECTS) $(COMOBJECTS)
  63. # decompression objectfiles
  64. DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  65.         jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
  66.         jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
  67. DOBJECTS= jdmain.o $(DLIBOBJECTS) $(COMOBJECTS)
  68. # These objectfiles are included in libjpeg.a
  69. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  70.  
  71.  
  72. all: ansi2knr cjpeg djpeg
  73. # By default, libjpeg.a is not built unless you explicitly request it.
  74. # You can add libjpeg.a to the line above if you want it built by default.
  75.  
  76.  
  77. # This rule causes ansi2knr to be invoked.  If you use this makefile,
  78. # make sure PROTO is not defined by jconfig.h.
  79.  
  80. .c.o:
  81.     ./ansi2knr $*.c tmpansi.c
  82.     $(CC) $(CFLAGS) -c tmpansi.c
  83.     mv tmpansi.o $*.o
  84.     $(RM) tmpansi.c
  85.  
  86. ansi2knr: ansi2knr.c
  87.     $(CC) $(CFLAGS) -o ansi2knr ansi2knr.c
  88.  
  89.  
  90. cjpeg: ansi2knr $(COBJECTS)
  91.     $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) $(LDLIBS)
  92.  
  93. djpeg: ansi2knr $(DOBJECTS)
  94.     $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) $(LDLIBS)
  95.  
  96. # libjpeg.a is useful if you are including the JPEG software in a larger
  97. # program; you'd include it in your link, rather than the individual modules.
  98. libjpeg.a: ansi2knr $(LIBOBJECTS)
  99.     $(RM) libjpeg.a
  100.     $(AR) libjpeg.a  $(LIBOBJECTS)
  101.     $(AR2) libjpeg.a
  102.  
  103. clean:
  104.     $(RM) *.o cjpeg djpeg libjpeg.a ansi2knr core tmpansi.* testout.ppm testout.jpg
  105.  
  106. distribute:
  107.     $(RM) jpegsrc.tar*
  108.     tar cvf jpegsrc.tar $(DISTFILES)
  109.     compress -v jpegsrc.tar
  110.  
  111. test: cjpeg djpeg
  112.     $(RM) testout.ppm testout.jpg
  113.     ./djpeg testorig.jpg >testout.ppm
  114.     ./cjpeg testimg.ppm >testout.jpg
  115.     cmp testimg.ppm testout.ppm
  116.     cmp testimg.jpg testout.jpg
  117.  
  118.  
  119. jbsmooth.o : jbsmooth.c jinclude.h jconfig.h jpegdata.h 
  120. jcarith.o : jcarith.c jinclude.h jconfig.h jpegdata.h 
  121. jccolor.o : jccolor.c jinclude.h jconfig.h jpegdata.h 
  122. jcdeflts.o : jcdeflts.c jinclude.h jconfig.h jpegdata.h 
  123. jcexpand.o : jcexpand.c jinclude.h jconfig.h jpegdata.h 
  124. jchuff.o : jchuff.c jinclude.h jconfig.h jpegdata.h 
  125. jcmain.o : jcmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c 
  126. jcmaster.o : jcmaster.c jinclude.h jconfig.h jpegdata.h 
  127. jcmcu.o : jcmcu.c jinclude.h jconfig.h jpegdata.h 
  128. jcpipe.o : jcpipe.c jinclude.h jconfig.h jpegdata.h 
  129. jcsample.o : jcsample.c jinclude.h jconfig.h jpegdata.h 
  130. jdarith.o : jdarith.c jinclude.h jconfig.h jpegdata.h 
  131. jdcolor.o : jdcolor.c jinclude.h jconfig.h jpegdata.h 
  132. jddeflts.o : jddeflts.c jinclude.h jconfig.h jpegdata.h 
  133. jdhuff.o : jdhuff.c jinclude.h jconfig.h jpegdata.h 
  134. jdmain.o : jdmain.c jinclude.h jconfig.h jpegdata.h jversion.h egetopt.c 
  135. jdmaster.o : jdmaster.c jinclude.h jconfig.h jpegdata.h 
  136. jdmcu.o : jdmcu.c jinclude.h jconfig.h jpegdata.h 
  137. jdpipe.o : jdpipe.c jinclude.h jconfig.h jpegdata.h 
  138. jdsample.o : jdsample.c jinclude.h jconfig.h jpegdata.h 
  139. jerror.o : jerror.c jinclude.h jconfig.h jpegdata.h 
  140. jquant1.o : jquant1.c jinclude.h jconfig.h jpegdata.h 
  141. jquant2.o : jquant2.c jinclude.h jconfig.h jpegdata.h 
  142. jfwddct.o : jfwddct.c jinclude.h jconfig.h jpegdata.h 
  143. jrevdct.o : jrevdct.c jinclude.h jconfig.h jpegdata.h 
  144. jutils.o : jutils.c jinclude.h jconfig.h jpegdata.h 
  145. jvirtmem.o : jvirtmem.c jinclude.h jconfig.h jpegdata.h 
  146. jrdjfif.o : jrdjfif.c jinclude.h jconfig.h jpegdata.h 
  147. jrdgif.o : jrdgif.c jinclude.h jconfig.h jpegdata.h 
  148. jrdppm.o : jrdppm.c jinclude.h jconfig.h jpegdata.h 
  149. jrdrle.o : jrdrle.c jinclude.h jconfig.h jpegdata.h 
  150. jrdtarga.o : jrdtarga.c jinclude.h jconfig.h jpegdata.h 
  151. jwrjfif.o : jwrjfif.c jinclude.h jconfig.h jpegdata.h 
  152. jwrgif.o : jwrgif.c jinclude.h jconfig.h jpegdata.h 
  153. jwrppm.o : jwrppm.c jinclude.h jconfig.h jpegdata.h 
  154. jwrrle.o : jwrrle.c jinclude.h jconfig.h jpegdata.h 
  155. jwrtarga.o : jwrtarga.c jinclude.h jconfig.h jpegdata.h 
  156.